package com.generate.control;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.HashMap;
import java.util.Map;

import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JLabel;
import javax.swing.JPanel;

public class JPanelVariant extends JPanel {
	private static JPanelVariant panelVariantCopy = null;
	private JTextFieldReplace rfVariantCode;
	private JTextFieldReplace tfVariantName;
	private JTextFieldReplace tfvariantPrices;
	private JTextFieldReplace tfVariantWasPrices;
	private JTextFieldReplace tfVariantImageName;
	private JTextFieldReplace tfVariantPromotion;
	private JTextFieldReplace tfVariantSummary;
	private JTextFieldReplace tfSummaryRichText;
	private JLabel lblNewLabel;
	private JLabel lblVariantName;
	private JLabel lblVariantPrices;
	private JLabel lblVariantWasPrices;
	private JLabel lblVariantImageName;
	private JLabel lblVariantPromotion;
	private JLabel lblVariantSummary;
	private JLabel lblVariantSummaryRich;
	private JButton btnVariantCode;
	private JButton btnVariantName;
	private JButton btnvariantPrices;
	private JButton btnVariantWasPrices;
	private JButton btnVariantImageName;
	private JButton btnVariantPromotion;
	private JButton btnVariantSummary;
	private JButton btnSummaryRichText;
	private JPanel panel;
	private JButton btnCopy;
	private JButton btnPaste;
	private JLabel lblNewLabel_1;
	private JLabel lblNewLabel_2;
	private JLabel lblwxh;
	private JLabel lblwxh_1;
	private JLabel lblwxh_2;
	private JLabel lblwxh_3;
	private JLabel lblwxh_4;
	private JLabel lblwxh_5;
	private JLabel lblwxh_6;
	private JLabel lblwxh_7;
	private JLabel lblwxh_8;
	private JLabel lblwxh_9;
	private JLabel lblImages;
	private JTextFieldReplace textFieldReplace;
	private JTextFieldReplace textFieldReplace_1;
	private JTextFieldReplace textFieldReplace_2;
	private JTextFieldReplace textFieldReplace_3;
	private JTextFieldReplace textFieldReplace_4;
	private JTextFieldReplace textFieldReplace_5;
	private JTextFieldReplace textFieldReplace_6;
	private JTextFieldReplace textFieldReplace_7;
	private JTextFieldReplace textFieldReplace_8;
	private JTextFieldReplace textFieldReplace_9;
	private JTextFieldReplace textFieldReplace_10;
	private JTextFieldReplace textFieldReplace_11;

	private final Map<String, IReplace> mapStringIReplace = new HashMap<String, IReplace>();
	private final Map<IReplace, String> mapIReplaceString = new HashMap<IReplace, String>();
	private JPanel panel_1;

	private void initPanel() {
		
	}

	public JPanelVariant(int variantNumber) {
		super();
		GridBagLayout gridBagLayout = new GridBagLayout();
		gridBagLayout.columnWidths = new int[] { 0, 0, 0, 0 };
		gridBagLayout.rowHeights = new int[] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
				0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
		gridBagLayout.columnWeights = new double[] { 0.0, 1.0, 0.0,
				Double.MIN_VALUE };
		gridBagLayout.rowWeights = new double[] { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
				0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
				0.0, 0.0, 0.0, 1.0, Double.MIN_VALUE };
		setLayout(gridBagLayout);

		lblNewLabel = new JLabel("Variant code");
		GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
		gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel.anchor = GridBagConstraints.EAST;
		gbc_lblNewLabel.gridx = 0;
		gbc_lblNewLabel.gridy = 0;
		add(lblNewLabel, gbc_lblNewLabel);

		rfVariantCode = new JTextFieldReplace();
		rfVariantCode.setFindText("@VARIANT_{0}_CODE@");
		GridBagConstraints gbc_rfVariantCode = new GridBagConstraints();
		gbc_rfVariantCode.insets = new Insets(0, 0, 5, 5);
		gbc_rfVariantCode.fill = GridBagConstraints.HORIZONTAL;
		gbc_rfVariantCode.gridx = 1;
		gbc_rfVariantCode.gridy = 0;
		add(rfVariantCode, gbc_rfVariantCode);

		btnVariantCode = new JButton("Paste");
		btnVariantCode.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (panelVariantCopy != null) {
					JPanelVariant.this.rfVariantCode
							.setText(panelVariantCopy.rfVariantCode.getText());
				}
			}
		});
		GridBagConstraints gbc_btnVariantCode = new GridBagConstraints();
		gbc_btnVariantCode.insets = new Insets(0, 0, 5, 0);
		gbc_btnVariantCode.gridx = 2;
		gbc_btnVariantCode.gridy = 0;
		add(btnVariantCode, gbc_btnVariantCode);

		lblVariantName = new JLabel("Variant name");
		GridBagConstraints gbc_lblVariantName = new GridBagConstraints();
		gbc_lblVariantName.insets = new Insets(0, 0, 5, 5);
		gbc_lblVariantName.anchor = GridBagConstraints.EAST;
		gbc_lblVariantName.gridx = 0;
		gbc_lblVariantName.gridy = 1;
		add(lblVariantName, gbc_lblVariantName);

		tfVariantName = new JTextFieldReplace();
		tfVariantName.setFindText("@VARIANT_{0}_NAME@");
		GridBagConstraints gbc_tfVariantName = new GridBagConstraints();
		gbc_tfVariantName.anchor = GridBagConstraints.NORTH;
		gbc_tfVariantName.insets = new Insets(0, 0, 5, 5);
		gbc_tfVariantName.fill = GridBagConstraints.HORIZONTAL;
		gbc_tfVariantName.gridx = 1;
		gbc_tfVariantName.gridy = 1;
		add(tfVariantName, gbc_tfVariantName);

		btnVariantName = new JButton("Paste");
		btnVariantName.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JPanelVariant.this.tfVariantName
						.setText(panelVariantCopy.tfVariantName.getText());
			}
		});
		GridBagConstraints gbc_btnVariantName = new GridBagConstraints();
		gbc_btnVariantName.insets = new Insets(0, 0, 5, 0);
		gbc_btnVariantName.gridx = 2;
		gbc_btnVariantName.gridy = 1;
		add(btnVariantName, gbc_btnVariantName);

		lblVariantPrices = new JLabel("Variant prices");
		GridBagConstraints gbc_lblVariantPrices = new GridBagConstraints();
		gbc_lblVariantPrices.insets = new Insets(0, 0, 5, 5);
		gbc_lblVariantPrices.anchor = GridBagConstraints.EAST;
		gbc_lblVariantPrices.gridx = 0;
		gbc_lblVariantPrices.gridy = 2;
		add(lblVariantPrices, gbc_lblVariantPrices);

		tfvariantPrices = new JTextFieldReplace();
		tfvariantPrices.setFindText("@VARIANT_{0}_PRICES@");
		GridBagConstraints gbc_tfvariantPrices = new GridBagConstraints();
		gbc_tfvariantPrices.insets = new Insets(0, 0, 5, 5);
		gbc_tfvariantPrices.fill = GridBagConstraints.HORIZONTAL;
		gbc_tfvariantPrices.gridx = 1;
		gbc_tfvariantPrices.gridy = 2;
		add(tfvariantPrices, gbc_tfvariantPrices);

		btnvariantPrices = new JButton("Paste");
		btnvariantPrices.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JPanelVariant.this.tfvariantPrices
						.setText(panelVariantCopy.tfvariantPrices.getText());
			}
		});
		GridBagConstraints gbc_btnvariantPrices = new GridBagConstraints();
		gbc_btnvariantPrices.insets = new Insets(0, 0, 5, 0);
		gbc_btnvariantPrices.gridx = 2;
		gbc_btnvariantPrices.gridy = 2;
		add(btnvariantPrices, gbc_btnvariantPrices);

		lblVariantWasPrices = new JLabel("Variant was prices");
		GridBagConstraints gbc_lblVariantWasPrices = new GridBagConstraints();
		gbc_lblVariantWasPrices.insets = new Insets(0, 0, 5, 5);
		gbc_lblVariantWasPrices.anchor = GridBagConstraints.EAST;
		gbc_lblVariantWasPrices.gridx = 0;
		gbc_lblVariantWasPrices.gridy = 3;
		add(lblVariantWasPrices, gbc_lblVariantWasPrices);

		tfVariantWasPrices = new JTextFieldReplace();
		tfVariantWasPrices.setFindText("@VARIANT_{0}_WAS_PRICES@");
		GridBagConstraints gbc_tfVariantWasPrices = new GridBagConstraints();
		gbc_tfVariantWasPrices.insets = new Insets(0, 0, 5, 5);
		gbc_tfVariantWasPrices.fill = GridBagConstraints.HORIZONTAL;
		gbc_tfVariantWasPrices.gridx = 1;
		gbc_tfVariantWasPrices.gridy = 3;
		add(tfVariantWasPrices, gbc_tfVariantWasPrices);

		btnVariantWasPrices = new JButton("Paste");
		btnVariantWasPrices.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JPanelVariant.this.tfVariantWasPrices
						.setText(panelVariantCopy.tfVariantWasPrices.getText());
			}
		});
		GridBagConstraints gbc_btnVariantWasPrices = new GridBagConstraints();
		gbc_btnVariantWasPrices.insets = new Insets(0, 0, 5, 0);
		gbc_btnVariantWasPrices.gridx = 2;
		gbc_btnVariantWasPrices.gridy = 3;
		add(btnVariantWasPrices, gbc_btnVariantWasPrices);

		lblVariantImageName = new JLabel("Variant image name");
		GridBagConstraints gbc_lblVariantImageName = new GridBagConstraints();
		gbc_lblVariantImageName.insets = new Insets(0, 0, 5, 5);
		gbc_lblVariantImageName.anchor = GridBagConstraints.EAST;
		gbc_lblVariantImageName.gridx = 0;
		gbc_lblVariantImageName.gridy = 4;
		add(lblVariantImageName, gbc_lblVariantImageName);

		tfVariantImageName = new JTextFieldReplace();
		tfVariantImageName.setFindText("@VARIANT_{0}_IMAGE_NAME@");
		GridBagConstraints gbc_tfVariantImageName = new GridBagConstraints();
		gbc_tfVariantImageName.insets = new Insets(0, 0, 5, 5);
		gbc_tfVariantImageName.fill = GridBagConstraints.HORIZONTAL;
		gbc_tfVariantImageName.gridx = 1;
		gbc_tfVariantImageName.gridy = 4;
		add(tfVariantImageName, gbc_tfVariantImageName);

		btnVariantImageName = new JButton("Paste");
		btnVariantImageName.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JPanelVariant.this.tfVariantImageName
						.setText(panelVariantCopy.tfVariantImageName.getText());
			}
		});
		GridBagConstraints gbc_btnVariantImageName = new GridBagConstraints();
		gbc_btnVariantImageName.insets = new Insets(0, 0, 5, 0);
		gbc_btnVariantImageName.gridx = 2;
		gbc_btnVariantImageName.gridy = 4;
		add(btnVariantImageName, gbc_btnVariantImageName);

		lblVariantPromotion = new JLabel("Variant promotion");
		GridBagConstraints gbc_lblVariantPromotion = new GridBagConstraints();
		gbc_lblVariantPromotion.insets = new Insets(0, 0, 5, 5);
		gbc_lblVariantPromotion.anchor = GridBagConstraints.EAST;
		gbc_lblVariantPromotion.gridx = 0;
		gbc_lblVariantPromotion.gridy = 5;
		add(lblVariantPromotion, gbc_lblVariantPromotion);

		tfVariantPromotion = new JTextFieldReplace();
		tfVariantPromotion.setFindText("@VARIANT_{0}_PROMOTION_TEXT@");
		GridBagConstraints gbc_tfVariantPromotion = new GridBagConstraints();
		gbc_tfVariantPromotion.insets = new Insets(0, 0, 5, 5);
		gbc_tfVariantPromotion.fill = GridBagConstraints.HORIZONTAL;
		gbc_tfVariantPromotion.gridx = 1;
		gbc_tfVariantPromotion.gridy = 5;
		add(tfVariantPromotion, gbc_tfVariantPromotion);

		btnVariantPromotion = new JButton("Paste");
		btnVariantPromotion.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JPanelVariant.this.tfVariantPromotion
						.setText(panelVariantCopy.tfVariantPromotion.getText());
			}
		});
		GridBagConstraints gbc_btnVariantPromotion = new GridBagConstraints();
		gbc_btnVariantPromotion.insets = new Insets(0, 0, 5, 0);
		gbc_btnVariantPromotion.gridx = 2;
		gbc_btnVariantPromotion.gridy = 5;
		add(btnVariantPromotion, gbc_btnVariantPromotion);

		lblVariantSummary = new JLabel("Variant summary");
		GridBagConstraints gbc_lblVariantSummary = new GridBagConstraints();
		gbc_lblVariantSummary.insets = new Insets(0, 0, 5, 5);
		gbc_lblVariantSummary.anchor = GridBagConstraints.EAST;
		gbc_lblVariantSummary.gridx = 0;
		gbc_lblVariantSummary.gridy = 6;
		add(lblVariantSummary, gbc_lblVariantSummary);

		tfVariantSummary = new JTextFieldReplace();
		tfVariantSummary.setFindText("@VARIANT_{0}_SUMMARY@");
		GridBagConstraints gbc_tfVariantSummary = new GridBagConstraints();
		gbc_tfVariantSummary.insets = new Insets(0, 0, 5, 5);
		gbc_tfVariantSummary.fill = GridBagConstraints.HORIZONTAL;
		gbc_tfVariantSummary.gridx = 1;
		gbc_tfVariantSummary.gridy = 6;
		add(tfVariantSummary, gbc_tfVariantSummary);

		btnVariantSummary = new JButton("Paste");
		btnVariantSummary.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JPanelVariant.this.tfVariantSummary
						.setText(panelVariantCopy.tfVariantSummary.getText());
			}
		});
		GridBagConstraints gbc_btnVariantSummary = new GridBagConstraints();
		gbc_btnVariantSummary.insets = new Insets(0, 0, 5, 0);
		gbc_btnVariantSummary.gridx = 2;
		gbc_btnVariantSummary.gridy = 6;
		add(btnVariantSummary, gbc_btnVariantSummary);

		lblVariantSummaryRich = new JLabel("Variant summary rich text");
		GridBagConstraints gbc_lblVariantSummaryRich = new GridBagConstraints();
		gbc_lblVariantSummaryRich.insets = new Insets(0, 0, 5, 5);
		gbc_lblVariantSummaryRich.anchor = GridBagConstraints.EAST;
		gbc_lblVariantSummaryRich.gridx = 0;
		gbc_lblVariantSummaryRich.gridy = 7;
		add(lblVariantSummaryRich, gbc_lblVariantSummaryRich);

		tfSummaryRichText = new JTextFieldReplace();
		tfSummaryRichText.setFindText("@VARIANT_{0}_SUMMARY_RICH_TEXT@");
		GridBagConstraints gbc_tfSummaryRichText = new GridBagConstraints();
		gbc_tfSummaryRichText.insets = new Insets(0, 0, 5, 5);
		gbc_tfSummaryRichText.fill = GridBagConstraints.HORIZONTAL;
		gbc_tfSummaryRichText.gridx = 1;
		gbc_tfSummaryRichText.gridy = 7;
		add(tfSummaryRichText, gbc_tfSummaryRichText);

		btnSummaryRichText = new JButton("Paste");
		btnSummaryRichText.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				JPanelVariant.this.tfSummaryRichText
						.setText(panelVariantCopy.tfSummaryRichText.getText());
			}
		});
		GridBagConstraints gbc_btnSummaryRichText = new GridBagConstraints();
		gbc_btnSummaryRichText.insets = new Insets(0, 0, 5, 0);
		gbc_btnSummaryRichText.gridx = 2;
		gbc_btnSummaryRichText.gridy = 7;
		add(btnSummaryRichText, gbc_btnSummaryRichText);
				
				panel_1 = new JPanel();
				GridBagConstraints gbc_panel_1 = new GridBagConstraints();
				gbc_panel_1.insets = new Insets(0, 0, 5, 5);
				gbc_panel_1.fill = GridBagConstraints.BOTH;
				gbc_panel_1.gridx = 1;
				gbc_panel_1.gridy = 8;
				add(panel_1, gbc_panel_1);
				GridBagLayout gbl_panel_1 = new GridBagLayout();
				gbl_panel_1.columnWidths = new int[]{320, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
				gbl_panel_1.rowHeights = new int[]{0, 0};
				gbl_panel_1.columnWeights = new double[]{1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
				gbl_panel_1.rowWeights = new double[]{0.0, Double.MIN_VALUE};
				panel_1.setLayout(gbl_panel_1);
										
												btnCopy = new JButton("Copy");
												GridBagConstraints gbc_btnCopy = new GridBagConstraints();
												gbc_btnCopy.insets = new Insets(0, 0, 0, 5);
												gbc_btnCopy.gridx = 11;
												gbc_btnCopy.gridy = 0;
												panel_1.add(btnCopy, gbc_btnCopy);
												btnCopy.addActionListener(new ActionListener() {
													public void actionPerformed(ActionEvent e) {
														panelVariantCopy = JPanelVariant.this;
													}
												});
								
										btnPaste = new JButton("Paste");
										GridBagConstraints gbc_btnPaste = new GridBagConstraints();
										gbc_btnPaste.gridx = 12;
										gbc_btnPaste.gridy = 0;
										panel_1.add(btnPaste, gbc_btnPaste);
				btnPaste.addActionListener(new ActionListener() {
					public void actionPerformed(ActionEvent e) {
						if (panelVariantCopy != null) {
							JPanelVariant.this.rfVariantCode
									.setText(panelVariantCopy.rfVariantCode.getText());
							JPanelVariant.this.tfVariantName
									.setText(panelVariantCopy.tfVariantName.getText());
							JPanelVariant.this.tfvariantPrices
									.setText(panelVariantCopy.tfvariantPrices.getText());
							JPanelVariant.this.tfVariantWasPrices
									.setText(panelVariantCopy.tfVariantWasPrices
											.getText());
							JPanelVariant.this.tfVariantImageName
									.setText(panelVariantCopy.tfVariantImageName
											.getText());
							JPanelVariant.this.tfVariantPromotion
									.setText(panelVariantCopy.tfVariantPromotion
											.getText());
							JPanelVariant.this.tfVariantSummary
									.setText(panelVariantCopy.tfVariantSummary
											.getText());
							JPanelVariant.this.tfSummaryRichText
									.setText(panelVariantCopy.tfSummaryRichText
											.getText());
						}
					}
				});

		lblImages = new JLabel("IMAGES");
		GridBagConstraints gbc_lblImages = new GridBagConstraints();
		gbc_lblImages.gridwidth = 3;
		gbc_lblImages.insets = new Insets(0, 0, 5, 0);
		gbc_lblImages.gridx = 0;
		gbc_lblImages.gridy = 9;
		add(lblImages, gbc_lblImages);

		lblNewLabel_1 = new JLabel("96Wx96H");
		GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
		gbc_lblNewLabel_1.anchor = GridBagConstraints.EAST;
		gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_1.gridx = 0;
		gbc_lblNewLabel_1.gridy = 10;
		add(lblNewLabel_1, gbc_lblNewLabel_1);

		textFieldReplace = new JTextFieldReplace();
		textFieldReplace.setFindText("@IMAGE_FILE_{0}_96Wx96H@");
		GridBagConstraints gbc_textFieldReplace = new GridBagConstraints();
		gbc_textFieldReplace.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace.gridx = 1;
		gbc_textFieldReplace.gridy = 10;
		add(textFieldReplace, gbc_textFieldReplace);

		lblNewLabel_2 = new JLabel("125Wx90H");
		GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();
		gbc_lblNewLabel_2.anchor = GridBagConstraints.EAST;
		gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5);
		gbc_lblNewLabel_2.gridx = 0;
		gbc_lblNewLabel_2.gridy = 11;
		add(lblNewLabel_2, gbc_lblNewLabel_2);

		textFieldReplace_1 = new JTextFieldReplace();
		textFieldReplace_1.setFindText("@IMAGE_FILE_{0}_125Wx90H@");
		GridBagConstraints gbc_textFieldReplace_1 = new GridBagConstraints();
		gbc_textFieldReplace_1.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_1.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_1.gridx = 1;
		gbc_textFieldReplace_1.gridy = 11;
		add(textFieldReplace_1, gbc_textFieldReplace_1);

		lblwxh = new JLabel("128Wx114H");
		GridBagConstraints gbc_lblwxh = new GridBagConstraints();
		gbc_lblwxh.anchor = GridBagConstraints.EAST;
		gbc_lblwxh.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh.gridx = 0;
		gbc_lblwxh.gridy = 12;
		add(lblwxh, gbc_lblwxh);

		textFieldReplace_2 = new JTextFieldReplace();
		textFieldReplace_2.setFindText("@IMAGE_FILE_{0}_128Wx114H@");
		GridBagConstraints gbc_textFieldReplace_2 = new GridBagConstraints();
		gbc_textFieldReplace_2.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_2.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_2.gridx = 1;
		gbc_textFieldReplace_2.gridy = 12;
		add(textFieldReplace_2, gbc_textFieldReplace_2);

		lblwxh_1 = new JLabel("128Wx85H");
		GridBagConstraints gbc_lblwxh_1 = new GridBagConstraints();
		gbc_lblwxh_1.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_1.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_1.gridx = 0;
		gbc_lblwxh_1.gridy = 13;
		add(lblwxh_1, gbc_lblwxh_1);

		textFieldReplace_3 = new JTextFieldReplace();
		textFieldReplace_3.setFindText("@IMAGE_FILE_{0}_128Wx85H@");
		GridBagConstraints gbc_textFieldReplace_3 = new GridBagConstraints();
		gbc_textFieldReplace_3.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_3.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_3.gridx = 1;
		gbc_textFieldReplace_3.gridy = 13;
		add(textFieldReplace_3, gbc_textFieldReplace_3);

		lblwxh_2 = new JLabel("130Wx130H");
		GridBagConstraints gbc_lblwxh_2 = new GridBagConstraints();
		gbc_lblwxh_2.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_2.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_2.gridx = 0;
		gbc_lblwxh_2.gridy = 14;
		add(lblwxh_2, gbc_lblwxh_2);

		textFieldReplace_4 = new JTextFieldReplace();
		textFieldReplace_4.setFindText("@IMAGE_FILE_{0}_130Wx130H@");
		GridBagConstraints gbc_textFieldReplace_4 = new GridBagConstraints();
		gbc_textFieldReplace_4.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_4.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_4.gridx = 1;
		gbc_textFieldReplace_4.gridy = 14;
		add(textFieldReplace_4, gbc_textFieldReplace_4);

		lblwxh_3 = new JLabel("130Wx80H");
		GridBagConstraints gbc_lblwxh_3 = new GridBagConstraints();
		gbc_lblwxh_3.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_3.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_3.gridx = 0;
		gbc_lblwxh_3.gridy = 15;
		add(lblwxh_3, gbc_lblwxh_3);

		textFieldReplace_5 = new JTextFieldReplace();
		textFieldReplace_5.setFindText("@IMAGE_FILE_{0}_130Wx80H@");
		GridBagConstraints gbc_textFieldReplace_5 = new GridBagConstraints();
		gbc_textFieldReplace_5.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_5.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_5.gridx = 1;
		gbc_textFieldReplace_5.gridy = 15;
		add(textFieldReplace_5, gbc_textFieldReplace_5);

		lblwxh_4 = new JLabel("138Wx80H");
		GridBagConstraints gbc_lblwxh_4 = new GridBagConstraints();
		gbc_lblwxh_4.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_4.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_4.gridx = 0;
		gbc_lblwxh_4.gridy = 16;
		add(lblwxh_4, gbc_lblwxh_4);

		textFieldReplace_6 = new JTextFieldReplace();
		textFieldReplace_6.setFindText("@IMAGE_FILE_{0}_138Wx80H@");
		GridBagConstraints gbc_textFieldReplace_6 = new GridBagConstraints();
		gbc_textFieldReplace_6.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_6.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_6.gridx = 1;
		gbc_textFieldReplace_6.gridy = 16;
		add(textFieldReplace_6, gbc_textFieldReplace_6);

		lblwxh_5 = new JLabel("164Wx115H");
		GridBagConstraints gbc_lblwxh_5 = new GridBagConstraints();
		gbc_lblwxh_5.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_5.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_5.gridx = 0;
		gbc_lblwxh_5.gridy = 17;
		add(lblwxh_5, gbc_lblwxh_5);

		textFieldReplace_7 = new JTextFieldReplace();
		textFieldReplace_7.setFindText("@IMAGE_FILE_{0}_164Wx115H@");
		GridBagConstraints gbc_textFieldReplace_7 = new GridBagConstraints();
		gbc_textFieldReplace_7.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_7.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_7.gridx = 1;
		gbc_textFieldReplace_7.gridy = 17;
		add(textFieldReplace_7, gbc_textFieldReplace_7);

		lblwxh_6 = new JLabel("220Wx120H");
		GridBagConstraints gbc_lblwxh_6 = new GridBagConstraints();
		gbc_lblwxh_6.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_6.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_6.gridx = 0;
		gbc_lblwxh_6.gridy = 18;
		add(lblwxh_6, gbc_lblwxh_6);

		textFieldReplace_8 = new JTextFieldReplace();
		textFieldReplace_8.setFindText("@IMAGE_FILE_{0}_220Wx120H@");
		GridBagConstraints gbc_textFieldReplace_8 = new GridBagConstraints();
		gbc_textFieldReplace_8.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_8.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_8.gridx = 1;
		gbc_textFieldReplace_8.gridy = 18;
		add(textFieldReplace_8, gbc_textFieldReplace_8);

		lblwxh_7 = new JLabel("300Wx180H");
		GridBagConstraints gbc_lblwxh_7 = new GridBagConstraints();
		gbc_lblwxh_7.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_7.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_7.gridx = 0;
		gbc_lblwxh_7.gridy = 19;
		add(lblwxh_7, gbc_lblwxh_7);

		textFieldReplace_9 = new JTextFieldReplace();
		textFieldReplace_9.setFindText("@IMAGE_FILE_{0}_300Wx180H@");
		GridBagConstraints gbc_textFieldReplace_9 = new GridBagConstraints();
		gbc_textFieldReplace_9.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_9.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_9.gridx = 1;
		gbc_textFieldReplace_9.gridy = 19;
		add(textFieldReplace_9, gbc_textFieldReplace_9);

		lblwxh_8 = new JLabel("30Wx32H");
		GridBagConstraints gbc_lblwxh_8 = new GridBagConstraints();
		gbc_lblwxh_8.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_8.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_8.gridx = 0;
		gbc_lblwxh_8.gridy = 20;
		add(lblwxh_8, gbc_lblwxh_8);

		textFieldReplace_10 = new JTextFieldReplace();
		textFieldReplace_10.setFindText("@IMAGE_FILE_{0}_30Wx32H@");
		GridBagConstraints gbc_textFieldReplace_10 = new GridBagConstraints();
		gbc_textFieldReplace_10.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_10.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_10.gridx = 1;
		gbc_textFieldReplace_10.gridy = 20;
		add(textFieldReplace_10, gbc_textFieldReplace_10);

		lblwxh_9 = new JLabel("300Wx300H");
		GridBagConstraints gbc_lblwxh_9 = new GridBagConstraints();
		gbc_lblwxh_9.anchor = GridBagConstraints.EAST;
		gbc_lblwxh_9.insets = new Insets(0, 0, 5, 5);
		gbc_lblwxh_9.gridx = 0;
		gbc_lblwxh_9.gridy = 21;
		add(lblwxh_9, gbc_lblwxh_9);

		textFieldReplace_11 = new JTextFieldReplace();
		textFieldReplace_11.setFindText("@IMAGE_FILE_{0}_300Wx300H@");
		GridBagConstraints gbc_textFieldReplace_11 = new GridBagConstraints();
		gbc_textFieldReplace_11.insets = new Insets(0, 0, 5, 5);
		gbc_textFieldReplace_11.fill = GridBagConstraints.HORIZONTAL;
		gbc_textFieldReplace_11.gridx = 1;
		gbc_textFieldReplace_11.gridy = 21;
		add(textFieldReplace_11, gbc_textFieldReplace_11);

		panel = new JPanel();
		GridBagConstraints gbc_panel = new GridBagConstraints();
		gbc_panel.anchor = GridBagConstraints.SOUTHEAST;
		gbc_panel.gridwidth = 2;
		gbc_panel.gridx = 1;
		gbc_panel.gridy = 22;
		add(panel, gbc_panel);
		panel.setLayout(new BoxLayout(panel, BoxLayout.X_AXIS));

		rfVariantCode.setFindText(rfVariantCode.getFindText().replace("{0}",
				variantNumber + ""));
		tfVariantName.setFindText(tfVariantName.getFindText().replace("{0}",
				variantNumber + ""));
		tfvariantPrices.setFindText(tfvariantPrices.getFindText().replace(
				"{0}", variantNumber + ""));
		tfVariantWasPrices.setFindText(tfVariantWasPrices.getFindText()
				.replace("{0}", variantNumber + ""));
		tfVariantImageName.setFindText(tfVariantImageName.getFindText()
				.replace("{0}", variantNumber + ""));
		tfVariantPromotion.setFindText(tfVariantPromotion.getFindText()
				.replace("{0}", variantNumber + ""));
		tfVariantSummary.setFindText(tfVariantSummary.getFindText().replace(
				"{0}", variantNumber + ""));
		tfSummaryRichText.setFindText(tfSummaryRichText.getFindText().replace(
				"{0}", variantNumber + ""));
	}
}
